import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'
Vue.use(VueRouter)

const router = new VueRouter({
  // mode: 'history', // require service support
  mode: 'history',
  // 控制路由跳转后的滚动行为
  scrollBehavior: () => ({ y: 0 }),
  routes
})

export default router
